<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of content
 *
 * @author dmitry
 */
require_once 'app/models/content.php';
class Views_Content extends Models_Content{
    //put your code here
    public function showLastAdded()
    {
        $content = $this->getLastAdded();
        foreach ($content as $id => $name)
        {
            $data = $this->getShortData($id) ;
            echo '<div class="unit">
                       <div>
                       <div class="image">
                            <img src="'.
                                $data['path'] . $data['name']
                            .'">
                       </div>
                       <div class="unitname">
                            <a href="'.
                            $data['uri'] . '">' .
                            $name .'</a>
                       </div>
                  </div>
                       <div class="price">' .
                           $data['price']
                       . '</div>' ;
        }
        
        
        
                                       
        
    }
}

echo '=================================' ;

?>
